/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */

package Lexer;

import java.util.regex.*;

/**
 *
 * @author jefoutta
 */
public class RE {
    private Pattern re;
    private Matcher matcher;
    private String name;
    
    public RE(String s){
        name = s;
    }

    public void compile(String s){
        re = Pattern.compile(s);
    }

    public String pattern(){
        return re.pattern();
    }
    
    public boolean matches(String s){
        matcher = re.matcher(s);
        boolean b = matcher.matches();
        return b;
    }

    public Pattern regex(){
        return re;
    }
}
